package com.shujia.wyh.day25;

/*
        public static void sleep(long millis)
        休眠线程（睡眠线程）
 */
public class ThreadSleepDemo {
    public static void main(String[] args) {
        //创建多线程环境
        MySleepThread t1 = new MySleepThread();
        MySleepThread t2 = new MySleepThread();
        MySleepThread t3 = new MySleepThread();

        //给线程起名字
        t1.setName("小白");
        t2.setName("小红");
        t3.setName("小蓝");

        //启动线程
        t1.start();
        t2.start();
        t3.start();
    }
}
